# coding=utf-8
# author=haishan09@gmail.com
from django import template
from django.template.loader import select_template

register = template.Library()

@register.assignment_tag(takes_context=True)
def get_valid_template(context, templ_1, templ_2):
    valid_template = select_template([templ_1, templ_2])
    return valid_template

